# Copyright (c) 2009 Daropia Project (www.daropia.org)
#
# This file is part of Daropia and is available under the terms
# of the GNU General Public Licence version 2.0 or later.


# Completes the users' table

Class.new(Sequel::Migration) do

	def up
		alter_table :users do
			add_column :name, String
			add_column :surname, String
			add_column :address, String
			add_column :gender, String
			add_column :dob, Date
			add_column :avatar, String
			add_column :validated, :boolean, :default => false
			add_column :creation_date, Date
			add_column :status, String, :default => 'membre'
			add_column :signature, String
			add_column :last_connection_date, Date
			add_column :description, String
		end
	end

	def down
		alter_table :users do
			drop_column :name
			drop_column :surname
			drop_column :address
			drop_column :gender
			drop_column :dob
			drop_column :avatar
			drop_column :validated
			drop_column :creation_time
			drop_column :status, String
			drop_column :signature, String
			drop_column :last_connection_date, Date
			drop_column :description, String
		end
	end


end
